import request from '@/config/axios'

// 客户采购清单 VO
export interface CustomerPurchaseListVO {
  id: number // 序号
  productName: string // 产品名称
  productModel: string // 产品型号
  hardwareVersion: string // 硬件版本
  softwareVersion: string // 软件版本
  remarks: string // 备注
}

// 客户采购清单 API
export const CustomerPurchaseListApi = {
  // 查询客户采购清单分页
  getCustomerPurchaseListPage: async (params: any) => {
    return await request.get({ url: `/om/customer-purchase-list/page`, params })
  },

  // 查询客户采购清单详情
  getCustomerPurchaseList: async (id: number) => {
    return await request.get({ url: `/om/customer-purchase-list/get?id=` + id })
  },

  // 新增客户采购清单
  createCustomerPurchaseList: async (data: CustomerPurchaseListVO) => {
    return await request.post({ url: `/om/customer-purchase-list/create`, data })
  },

  // 修改客户采购清单
  updateCustomerPurchaseList: async (data: CustomerPurchaseListVO) => {
    return await request.put({ url: `/om/customer-purchase-list/update`, data })
  },

  // 删除客户采购清单
  deleteCustomerPurchaseList: async (id: number) => {
    return await request.delete({ url: `/om/customer-purchase-list/delete?id=` + id })
  },

  // 导出客户采购清单 Excel
  exportCustomerPurchaseList: async (params) => {
    return await request.download({ url: `/om/customer-purchase-list/export-excel`, params })
  },
}